home *** CD-ROM | disk | FTP | other *** search
/ Aminet 14 / Aminet 14 - Oct 1996.iso / TCalc / Italiano / TurboCalc3.5Demo / Programmer / Examples.lha / tclib2.i < prev   
Text File  |  1994-11-28  |  2KB  |  95 lines

  1.  
  2.  
  3. BASE: equr a5
  4.  
  5. XSR: macro
  6.     jsr     xrout_\1(BASE)
  7.  endm
  8. XMP: macro
  9.     jmp     xrout_\1(BASE)
  10.  endm
  11.  
  12.  
  13. CALL: macro
  14.     jsr     \1(a6)
  15.  endm
  16. CALL_J: macro
  17.     jmp     \1(a6)
  18.  endm
  19.  
  20. DO: macro
  21.     jsr \1
  22.  endm
  23.  
  24. DO_JMP: macro
  25.  jmp \1
  26.  endm
  27.  
  28.  
  29.  
  30.  
  31. GETEXEC: macro
  32.     move.l  4.w,a6
  33.  endm
  34. GETDOS: macro
  35.     move.l  DosBase(BASE),a6
  36.  endm
  37. GETINT: macro
  38.     move.l  IntuitionBase(BASE),a6
  39.  endm
  40. GETGFX: macro
  41.     move.l  GfxBase(BASE),a6
  42.  endm
  43. GETLAY: macro
  44.     move.l  LayersBase(BASE),a6
  45.  endm
  46. GETFONT: macro
  47.     move.l  DiskFontBase(BASE),a6
  48.  endm
  49.  
  50.  
  51. **************************************************************************
  52. ********* the STRUCTURE-definitions **************************************
  53. ******* if you include it from somewhere else, simply remove here ********
  54. ******* (except for the last one: XVECT                           ********
  55. **************************************************************************
  56.  
  57. STRUCTURE: macro
  58. soffset set \2
  59.  endm
  60. LONG: macro
  61. \1 equ soffset
  62. soffset set soffset+4
  63.  endm
  64. WORD: macro
  65. \1 equ soffset
  66. soffset set soffset+2
  67.  endm
  68. BYTE: macro
  69. \1 equ soffset
  70. soffset set soffset+1
  71.  endm
  72. STRUCT: macro
  73. \1 equ soffset
  74. soffset set soffset+\2
  75.  endm
  76. LABEL: macro
  77. \1 equ soffset
  78.  endm
  79. ALIGN2: macro
  80. soffset set (soffset+1)&$fffffffe
  81.  endm
  82. ALIGN4: macro
  83. soffset set (soffset+3)&$fffffffc
  84.  endm
  85.  
  86.  
  87. ******************************************************
  88. ******************************************************
  89.  
  90. XVECT: macro ;
  91.     STRUCT xrout_\1,6   ; will be initialized with $4ef9 (jmp $xxxx)
  92.  endm
  93.  
  94.  
  95.